package org.jeecg.modules.ncmeapis.network.service;

import org.jeecg.modules.ncmeapis.network.entities.entity.NetworkPath;
import org.jeecg.modules.ncmeapis.network.entities.entity.vo.PathWithPerm;
import org.springframework.http.ResponseEntity;

import java.io.File;
import java.util.List;

public interface INetworkService {

    //=================================文件查看相关=================================

    List<PathWithPerm> list(String pid, boolean showFile);

    File getLocalDirectory(String fileId);

    File getLocalFile(String fileId);

    void preview(String fileId);

    ResponseEntity<?> download(String pathId);

    //=================================文件修改相关=================================

    NetworkPath edit(String pathId);

    NetworkPath rename(String pathId, String newName);

    NetworkPath move(String pathId, String targetId);

    //=================================文件上传相关=================================

    NetworkPath mkdir(String dirName, String targetId);

    NetworkPath mkdirIfNotExist(String dirName, String targetId);

    NetworkPath upload(String targetPathId, String fileUrl, String fileSource);

    //=================================文件删除相关=================================

    void delete(String pathId);

    void checkNameRepeats(String pathId, String pathName, String pathType);

}
